﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using LongQuanWeb.App_Code;

namespace LongQuanWeb.Homes
{
    public partial class Talent : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind();
            }
        }

        private void Bind()
        {
            //VolunteerType 1 高学历人才 
            string strSql = "Select Top 12 * From dbo.Volunteer Where VolunteerType='1' Order by ID Desc ";
            DataTable dt = DbHelperSQL.Query(strSql).Tables[0];
            this.rpt_gxlnr.DataSource = dt;
            this.rpt_gxlnr.DataBind();
            //VolunteerType 2 创业人才 
            strSql = "Select Top 12 * From dbo.Volunteer Where VolunteerType='2' Order by ID Desc";
            dt = DbHelperSQL.Query(strSql).Tables[0];
            this.rpt_cynr.DataSource = dt;
            this.rpt_cynr.DataBind();
            //VolunteerType 3 技术人才 
            strSql = "Select Top 12 * From dbo.Volunteer Where VolunteerType='3' Order by ID Desc";
            dt = DbHelperSQL.Query(strSql).Tables[0];
            this.rpt_jsnr.DataSource = dt;
            this.rpt_jsnr.DataBind();
            //VolunteerType 4 艺术人才 
            strSql = "Select Top 12 * From dbo.Volunteer Where VolunteerType='4' Order by ID Desc";
            dt = DbHelperSQL.Query(strSql).Tables[0];
            this.rpt_ysnr.DataSource = dt;
            this.rpt_ysnr.DataBind();
        }
    }
}
